
changping348()
{
	networksetup -setmanual xiaomi 11.0.44.11 255.255.255.192 11.0.44.1
	networksetup -setwebproxystate xiaomi on
	networksetup -setsecurewebproxystate xiaomi on
	networksetup -setwebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setsecurewebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setdnsservers xiaomi 10.33.176.66 10.33.176.67
	networksetup -setproxybypassdomains xiaomi "10.*" "*.cnpc" "*.cnpc.*" "localhost" "192.*" "11.*"
}

changping328()
{
	networksetup -setmanual xiaomi 11.0.43.93 255.255.255.192 11.0.43.65
	networksetup -setwebproxystate xiaomi on
	networksetup -setsecurewebproxystate xiaomi on
	networksetup -setwebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setsecurewebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setdnsservers xiaomi 10.33.176.66 10.33.176.67
	networksetup -setproxybypassdomains xiaomi "10.*" "*.cnpc" "*.cnpc.*" "localhost" "192.*" "11.*"
}

gehua(){
	networksetup -setmanual xiaomi 10.88.113.131 255.255.255.192 10.88.113.190
	networksetup -setwebproxystate xiaomi on
	networksetup -setsecurewebproxystate xiaomi on
	networksetup -setwebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setsecurewebproxy xiaomi proxy3.bj.petrochina 8080
	networksetup -setdnsservers xiaomi 10.33.176.66 10.33.176.67
	networksetup -setproxybypassdomains xiaomi "10.*" "*.cnpc" "*.cnpc.*" "localhost" "192.*"
}

CNPCProxy(){
	networksetup -setwebproxy Wi-Fi proxy3.bj.petrochina 8080
	networksetup -setsecurewebproxy Wi-Fi proxy3.bj.petrochina 8080
	networksetup -setdnsservers Wi-Fi 10.33.176.66 10.33.176.67
	networksetup -setproxybypassdomains Wi-Fi "10.*" "*.cnpc" "*.cnpc.*" "localhost" "192.*" "11.*"
}
unsetCNPCProxy(){
	networksetup -setwebproxy Wi-Fi 
	networksetup -setsecurewebproxy Wi-Fi 
	networksetup -setdnsservers Wi-Fi 
	networksetup -setproxybypassdomains Wi-Fi
}

gitproxy(){
	git config --global http.proxy 'socks5://127.0.0.1:1081'
	git config --global https.proxy 'socks5://127.0.0.1:1081'
}

gitunsetproxy(){
	git config --global --unset http.proxy
	git config --global --unset https.proxy
}

if [[ $1 == "348" ]]; then
	changping348
fi

if [[ $1 == "328" ]]; then
	changping328
fi

if [[ $1 == "gehua" ]]; then
	gehua
fi

if [[ "$1" == "gitproxy" ]]; then
	gitproxy
fi

if [[ $1 == "gitunsetproxy" ]]; then
	gitunsetproxy
fi

if [[ $1 == "cnpcproxy" ]]; then
	CNPCProxy
fi

if [[ $1 == "unsetcnpcproxy" ]]; then
	unsetCNPCPRroxy
fi